package com.cebbank.sz.cebtemplate.utils;

//import com.alibaba.druid.filter.config.ConfigTools;
import com.baomidou.mybatisplus.core.toolkit.AES;

public class DruidUtils {
    public static void main(String[] args) throws Exception {
//        username: CEBCA
//        password: 123456
//        url: jdbc:oracle:thin:@127.0.0.1:1521/XE
        String jdbcUrl="jdbc:oracle:thin:@127.0.0.1:1521/XE";
        String userName="CEBCA";
        String password = "123456";
//        System.out.println(ConfigTools.encrypt(password));
        // 生成 16 位随机 AES 密钥
        String randomKey = "882dc4113b050127";
// 随机密钥加密
        String result = AES.encrypt(jdbcUrl, randomKey);
        System.out.println("密钥："+randomKey);
        System.out.println("url: mpw:"+result);
        result = AES.encrypt(userName, randomKey);
        System.out.println("username: mpw:"+result);
        result = AES.encrypt(password, randomKey);
        System.out.println("password: mpw:"+result);

    }

}
